﻿
Partial Class Hosteria_VS_Paises
    Inherits System.Web.UI.Page
    Private Property dbResult As Integer

    Protected Sub lbAgregar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lbAgregar.Click
        sdaPais.InsertParameters.Item("Code").DefaultValue = txtCode.Text
        sdaPais.InsertParameters.Item("Nombre").DefaultValue = txtNombre.Text()
        dbResult = sdaPais.Insert()
        If dbResult = 1 Then
            txtCode.Text = ""
            txtNombre.Text = ""
        Else
            MsgBox("No se pudo agregar.", MsgBoxStyle.Exclamation, "Error de sistema")
        End If
    End Sub

End Class
